import {request} from "@@/plugin-request/request";
import {HttpResult} from "@/services/typings";
import {LoginParams, LoginUser} from "@/services/system/login/types";

export async function login(body: LoginParams, options?: { [key: string]: any }) {
  return request<HttpResult<LoginUser>>('/api/sys/open/login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
